1. Field of the Invention
The present invention relates generally to an apparatus and a method for booting a computer, and more particularly, to an apparatus and a method for locating a hibernation file and selecting a boot drive in a computer with multiple-bays for supporting data storage drives.
2. Description of the Related Art
The decade of the nineties, aptly labeled the information age, saw the acceptance of personal computers in numerous mainstream applications. The proliferation of personal computers in the nineties was driven in part by the ever-increasing performance of the processor and the downwardly spiraling prices of personal computers. This trend was further accelerated with the development of portable computers which offered mobile computing capability. Lightweight, yet powerful mobile computers such as portables, luggables, laptops, notebooks, palm tops and personal digital assistants provided the processing capability needed for mobile processing of many computer intensive applications, including computer-aided design, three-dimensional animation and multimedia presentation. These applications typically required the portable computer to support a large capacity disk drive for spooling video images and/or a compact disk read only memory (CD-ROM) for high capacity non-volatile data storage. Furthermore, as certain applications such as slide presentations may be lengthy but not data storage intensive, it may desirable to have more battery packs to support a longer operating period when alternating current (AC) power is not available.
Although portable computer users desired both a large data storage capacity and a long operating period, limits such as weight, space and power consumption restrictions imposed by the physical structure of the portable computer limited the user to only specific data storage device and battery pack combinations. As each application is unique in term of its requirements for data storage capacity, CD-ROM availability, and battery operating period, the standard portable computer design was inadequate for all applications.
One solution to this problem was provided by the Compaq LTE-5000 portable computer. The Compaq LTE-5000 portable computer offered multiple bays accommodating a variety of LTE-5000 compatible expansion packs. These packs included additional disk drives, CD-ROM players and/or battery packs. These portable computers offered the user the flexibility of customizing the portable computer for specific applications. For instance, in applications requiring multimedia presentations, one of the bays could be configured for a CD-ROM. Alternatively, in the event that the user is running data intensive applications such as CAD application which require high speed and large capacity disk storage systems, the user can simply insert one or more additional disk drives into the bay slots. Alternatively, in the event that the user wishes to maximize his or her mobile computing time, the portable computer may be equipped with a plurality of battery packs which extend the operating period for the user.
In the event that more than one bootable data storage drive had been inserted in the bays, users desired the ability to specify the particular drive to boot from as well as the booting sequence of the drives. The multiple data storage drive boot (multi-boot) selection process for drives that may be mounted or dismounted on the fly necessitated certain changes to the traditional IBM PC compatible Basic Input/Output System (BIOS) routine which served as an interface between high level system calls and the low level machine language routines which controlled the hardware.
In a standard IBM compatible personal computer, the BIOS software supported a primary Intelligent Drive Electronics (IDE) channel interface having a number of I/O ports accessible via a task file interface: 01F0h (data port, 16 bits), 01F1h-01F7h (command and status port, 8-bit access only), and 03F6h-03F7h (reset drive and alternate status, 8-bit access only). Additionally, a second channel with IDE ports located at 0170h-01Fh and 0376h-0377h was supported by the standard BIOS. To individually select the register ports, each channel provided chip select signals CS1 to decode registers located at I/O addresses 01FXh and 017Xh of the task file register and CS3 to further decode the respective data and control registers residing at I/O addresses 03F6h-03F7h and 0376h-0377h of the task file register. In such systems, BIOS accesses to the floppy and hard disk drives were performed via an interrupt function called INT 13 which supported functions such as initialize drive, read status of previous operation, read/write/verify sectors, format track, determine drive parameters such as disk type/disk change, and format the floppy diskette. In the interrupt 13, the first floppy drive (A:) was assigned to the drive number 00H and the second floppy disk drive was assigned the number 01H. Similarly, the first hard disk was assigned to number 80h and the second number hard drive was assigned to 81h. In addition to INT 13, a second class of interrupt function known as INT 19 was supported by the BIOS and caused a warm boot to occur when invoked. The warm boot of INT 19 only reloaded the operating system and bypassed the check on the condition of the hardware components such the memory and interrupt controllers, among others.
In the Compaq LTE-5000, in the event that multiple bootable data storage devices were inserted in the bays, the user determined the booting order by specifying an initial program load (IPL) sequence into a non-volatile system setup memory (NV-RAM) during a computer setup phase prior to the first boot sequence. The IPL sequence is a linked list serially linking the drives in the order that they are to boot. The IPL data storage structure further storing drive boot characteristics such whether the drive is a CD-ROM player, a hard disk drive or a floppy drive. Further statistics such as the storage capacity of each drive are also stored in the IPL data storage structure.
The Compaq LTE-5000 conformed to the BIOS boot specification version 1.0, available from Compaq Corporation and Phoenix Corporation. The BIOS boot specification version 1.0 allowed the user to specify an IPL order which included the first hard disk, the first CD-ROM drive or the first floppy drive. The Compaq LTE-5000 multi-boot functionality was achieved by redefining the first hard disk in the IPL order as the BIOS INT 13 drive located at I/O address 80h, regardless of the drive's IDE channel and IDE device status.
Although the BIOS version 1.0 specification was adequate for a desktop computer where the location and number of the data storage devices were fairly static, the limitation was particularly inconvenient for portable computers with multi-bay capability, as the BIOS boot specification required the user to reestablish the IPL order or sequence every time he or she changed any device in the multi-bay portable computer. Additionally, the specific redefinition of the first hard disk in the IPL order as the BIOS INT 13 drive located at 80h was overly restrictive.
The ability to transparently swap drives and specify the particular drive to boot from was desirable for a number of reasons, namely (1) the user might wish to transfer the hard drive from another portable computer that he or she previously operated; or (2) the user might wish to have different hard drives booting up different operating systems, including one hard drive for Windows 3.1.TM., one hard drive for Windows 95.TM. and one hard drive for Windows-NT.TM.. Thus, it is desirable that data storage devices be swappable without requiring the user to reestablish the IPL order or sequence every time he or she changed a device in any bay of the portable computer.
On a related issue, one problem associated with battery powered portable computer systems is the operating period per set of batteries. Although portable computer users prefer long operating time between battery recharge or replacement operations, the weight and space limits imposed by the physical structure of the portable computer provide a natural limit to the operating period that a set of battery can support. One solution for reducing the power consumption of a portable computer system, particularly when the system is not in use, is provided by portable computers which use a suspend capability incorporated in Intel's 486.TM. SL microprocessor. The suspend hardware allows the system to power-off with an application running after a predetermined period of user inactivity and resume the application transparently when the user resumes operating the portable computer. In accordance with the Intel 486.TM. SL data sheet, the suspend mode is the maximum power saving mode as it eliminates all power usage except that required to retain the state of the computer system before power is removed. In the Intel system, before causing the computer system to enter the suspended mode, a suspend request handler saves the state of the computer memory such that the computer can return to the before the power down operation. In addition, register contents of the processor and peripheral components such as the 82360SL I/O chip need to be extracted from the components and saved either in a nonvolatile RAM or in a disk drive because the contents of these registers may be overwritten by a system management interrupt handler for resuming operation on the portable computer. Thus, for example, the 82360SL I/O chip contains certain standard ISA peripheral controllers, some of which have only write-only registers. For compatibility reasons, these registers cannot be modified. Therefore, these registers are shadowed in the 82360SL I/O chip such that their states can be accurately restored in the resume function. Thus, in addition to primary memory contents, the suspend code has to save the state of the registers of the processor as well as support chips for the resumption of processing when the computer is waked up.
In the event that the system is in suspension, activities directed at the computer, such as the assertion of the suspend/resume button pin or the opening of the lid of the computer, initiate a resume operation to remove the computer system from its suspend state. When a resume operation is initiated, the 82360SL chip restarts the CPU clock and causes a soft reset. During warm-boot, by examining the suspend status bit, the system BIOS can determine if a reset had been caused by a resume event. If the suspend status bit is set, the reset is a resume reset and control should be passed to the system management interrupt handler. In this manner, in the Intel 486.TM. SL, information saved by nonvolatile memory before the suspend operation is used by the SMI handler to restore the system to its original state prior to suspend.
Since the Intel 486.TM. SL specification, computer vendors have added a variation known as hibernation where the contents of memory as well as the support chips and the registers are stored in a disk file known as a hibernation file rather than in a nonvolatile memory. The ability to store the hibernation file in the disk drive allows much larger system configurations to be stored, such as much larger DRAM size, high resolution video memory, and related information to be economically stored in the computer systems already available disk drive. By using the disk drive in place of the non-volatile RAM, the computer system can hibernate even if memory intensive applications are loaded into memory. Further, by using an existing disk drive rather than adding an expensive non-volatile memory devices, the price of the computer system is kept minimal.
In conventional portable computers where the data storage devices are static in position, the hibernation file can simply be stored in the primary hard disk data storage device. However, in portable computers with the multi-bay capability, it is possible that the data storage device containing the hibernation file be removed and inserted in a different bay. Such an occurrence would be highly undesirable as the portable computer would be unable to locate the hibernation file necessary to restore the portable computer back to its pre-suspend state. In such an event, the user may lose his or her data after the portable computer exits its hibernation process.